package com.example.langchain4jintegration.controller;

import com.example.langchain4jintegration.service.AssistantService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wwl
 * 日期  2025/9/19 15:16
 * 版本 1.0
 * 描述 :
 */
@RestController
public class AssistantController1 {
    @Resource
    private AssistantService assistantService;

    // http://localhost:9003/lc4j/boot/declarative
    @GetMapping(value = "/lc4j/boot/declarative")
    public String declarative(@RequestParam(value = "prompt", defaultValue = "你是谁") String prompt)
    {
        return assistantService.chat(prompt);
    }
}
